Indentation Rules.tmPreferences (1195B)
1 <?xml version="1.0" encoding="UTF-8"?> 2 <plist version="1.0"> 3 <dict> 4 <key>scope</key> 5 <string>source.ruby</string> 6 <key>settings</key> 7 <dict> 8 <key>decreaseIndentPattern</key> 9 <string>^\s*([}\]]|(end|rescue|ensure|else|elsif|when)\b)</string> 10 <key>increaseIndentPattern</key> 11 <string><![CDATA[(?x)^ 12 (\s* 13 ( 14 module|class|(?:(?:private|protected|public)\s+)?def 15 |unless|if|else|elsif 16 |case|when 17 |begin|rescue|ensure 18 |for|while|until 19 | 20 (?=.*? \b(do|begin|case|if|unless)\b ) 21 # the look-ahead above is to quickly discard non-candidates 22 ( 23 "(\\.|[^\\"])*+" # eat a double quoted string 24 | '(\\.|[^\\'])*+' # eat a single quoted string 25 | [^#"'] # eat all but comments and strings 26 )* 27 ( 28 \s (do|begin|case) 29 | [-+=&|*/~%^<>~](?<!\$.) \s*+ (if|unless) 30 ) 31 )\b 32 (?! [^;]*+ ; .*? \bend\b ) 33 | 34 ( 35 "(\\.|[^\\"])*+" # eat a double quoted string 36 | '(\\.|[^\\'])*+' # eat a single quoted string 37 | [^#"'] # eat all but comments and strings 38 )* 39 ( 40 \{ (?! [^}]*+ \} ) 41 | \[ (?! [^\]]*+ \] ) 42 ) 43 ).*$ 44 ]]></string> 45 </dict> 46 </dict> 47 </plist>